package
{
	import BasicEngine.*;
	import DataStore.DataSource;
	import DataStore.ResourceManager;
	import Enums.LoadType;
	import flash.display.FrameLabel;
	import flash.events.KeyboardEvent;
	import Player.AnimationEntData;
	import Player.DataCenter;
	import SceneUnit.TileMap;
	
	import GameScheduler.Game;
	
	import Map.MapManager;
	
	import MenuUnit.LoginMenu;
	import MenuUnit.MapEditMenu;
	import MenuUnit.MenuManager;
	
	import Props.PropManager;
	
	import SceneUnit.PlayScene;
	import SceneUnit.SceneManager;
	
	import adobe.utils.ProductManager;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import flash.net.URLRequest;
	import flash.utils.ByteArray;
	import flash.utils.Dictionary;
	import flash.utils.getTimer;
	import Player.*;
	
	[SWF(width = "1200", height = "742", backgroundColor = "0xcccc99",frameRate = "60")]
	
	public class SwordAndPlough extends Sprite
	{
		public var arr:Vector.<int> = new Vector.<int>();
		public var s:int = 0;
		public function SwordAndPlough()
		{
			var game:Game = new Game();
			game.Init(this,50,50,1200,742,stage);
			game.Star();
			
			MenuManager.AddMenu(new LoginMenu(), "LoginMenu", 0, 0);
			MenuManager.AddMenu(new MapEditMenu(), "MapEditMenu", 0, 0);
			MenuManager.SwitchMenu("LoginMenu");
			
		    
			ResourceManager.Init();
			ResourceManager.AddImgLoadTaskEle("Atk", "../Resource/Image/RedArmy/Soliders/Atk.png", "Solider", ResourceManager.OnParseLargeImg);
			ResourceManager.AddImgLoadTaskEle("Mov", "../Resource/Image/RedArmy/Soliders/Mov.png", "Solider", ResourceManager.OnParseLargeImg);
			ResourceManager.AddImgLoadTaskEle("Spc", "../Resource/Image/RedArmy/Soliders/Spc.png", "Solider", ResourceManager.OnParseLargeImg);
			
			ResourceManager.AddUrlLoadTask("../Resource/Shader/pixelate.pbj", function(e:ByteArray):void {
				ResourceManager.OnParseShader(e);
			});
			ResourceManager.AddUrlLoadTask("../Resource/Shader/corect.pbj", function(e:ByteArray):void {
				ResourceManager.OnParseShader(e);
			});				
			
		}		
		
		
	}
	
	
}